
var ownNoticeflag = true
document.getElementsByClassName('first')[0].onclick = function () {
    location.href = "homepage.html"
}
document.getElementsByClassName('first')[1].onclick = function () {
    location.href = "talk.html"
}
document.getElementsByClassName('first')[3].onclick = function () {
    location.href = "index3.html"
}
document.getElementsByClassName('first')[2].onclick = function () {
    location.href = "Article.html"
}
document.getElementsByClassName('first')[4].onclick = function () {
    location.href = "bookShop.html"
}

document.getElementsByClassName('second')[0].onclick = function () {
    location.href = "personal.html"
}
$('.second:last-child').on('click', function () {
    if (ownNoticeflag == true) {
        $('#ownNotice').css('display', 'inline-block')
        ownNoticeflag = false
    }
    else {
        $('#ownNotice').css('display', 'none')
        ownNoticeflag = true
    }

})
if(localStorage['name']){
    var uid = localStorage['name']
    console.log(uid)
}
$.ajax({
    url:'http://localhost:3000/nav/img',
    type:'get',
    dataType:'json',
    data:{uid:uid},
    success:function(res){
        var e=res
        $('.second img').attr('src',`upload/${e.data[0].headImg}`)
        $('.conmentmain .conmentown img').attr('src',`upload/${e.data[0].headImg}`)
        $('#icon #icon_image').attr('src',`upload/${e.data[0].headImg}`)
    }
})


